package com.jingdong.config;


import org.quartz.JobDetail;
import org.quartz.SimpleScheduleBuilder;
import org.quartz.Trigger;
import org.quartz.TriggerBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Zqm
 */
@Configuration
public class QuartzConfiguration {


    //更新频率 半小时1800s
    private static final  int TIME=1800;


    /**
     * JobDetail  任务 批量插入
     * @return
     */
    //TODO  后期加上缓存  每次 先存缓存  再从缓存中拿数据 存数据库
 /*   @Bean
    public JobDetail weatherDataSyncJobDetail(){

       return  null;
    }*/


    /**
     * Trigger  触发条件
     *
     */
   /* @Bean
    public Trigger weatherDataSyncTrigger(){
        SimpleScheduleBuilder scheduleBuilder=SimpleScheduleBuilder.simpleSchedule()
                .withIntervalInSeconds(TIME)
                .repeatForever();
        return null;
    }
*/


}
